descriptive2 <-  subset(main_dyad, subset_analysis == 1 & int_grp_rel_dominant == 1)
descriptive2 <- descriptive2[c("cv_event","sa_territory_t","included_excluded","excluded_excluded",dyad_nat_vars,dyad_unit_vars, unit_vars_unlogged, nat_vars_unlogged,"cv_event_peaceyears_l1","cv_event_any_slag_l1")]
descriptive2 <- data.frame(descriptive2)
stargazer(descriptive2, type="text", title="Table A2. Descriptive statistics (communal violence models).", style = "apsr", notes.append=FALSE, covariate.labels = c("Communal violence","Territorial autonomy","Included/excluded","Excluded/excluded","Relative size (state, mean)","Relative size (state, diff.)","Relative size (unit, mean)","Relative size (unit, diff.)","Asymmetry", "Population (unit)", "Area (unit)", "Avg. ruggedness (unit)", "Oil in unit", "Distance capital (unit)", "Distance border (unit)","GDP pc.", "Population (state)","Democracy","Ethnic fractionalization","Election year","Peaceyears","Communal violence spatial lag"), out="../tables/tablea2.txt")